package gui;

import java.util.Observable;
import java.util.Observer;

import model.Stack;

/**
 * 
 * @author Alexey Kuprin
 * 
 */
public class StackAlert implements Observer {
	private MainFrame frame;

	public StackAlert(MainFrame frame) {
		this.frame = frame;
	}

	@Override
	public void update(Observable o, Object arg) {
		if (arg != null) {
			Notification n = new Notification((Stack) arg);
			n.setVisible(true);
		} else
			frame.updateView();
	}
}